//
//  HomeThirdCollectionViewCell.m
//  JewelryStore
//
//  Created by apple on 2016/10/29.
//  Copyright © 2016年 com. All rights reserved.
//

#import "HomeThirdCollectionViewCell.h"

@interface HomeThirdCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIButton *tryBtn;
@property (weak, nonatomic) IBOutlet UIImageView *spotImage;

@property (nonatomic, assign) BOOL isHave;  //是否现货
@property (nonatomic, assign) BOOL isTry;   //是否可试戴
@end

@implementation HomeThirdCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
   
   }

- (void)setModel:(NSDictionary *)model
{
    _model = model;
    _productImage.image = KImageNamed(model[@"image"]);
    _productDecription.text = model[@"description"];
    _productPrice.text = model[@"price"];
    _isHave = [model[@"isHave"] boolValue];
    _isTry = [model[@"isTry"] boolValue];
    if (_isHave) {
        _spotImage.hidden = NO;
    }
    if (_isTry) {
        _tryBtn.hidden = NO;
    }

}

- (void)reset
{
    _spotImage.hidden = YES;
    _tryBtn.hidden = YES;
}
@end
